home *** CD-ROM | disk | FTP | other *** search
/ Vypalování CD / Vypalovani-CD-cd1.bin / Backup-Burner Add-On SDK 5.0 / ExampleSource / VB / Form1.frm < prev   
Text File  |  2002-03-23  |  3KB  |  87 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   3195
  5.    ClientLeft      =   4935
  6.    ClientTop       =   2070
  7.    ClientWidth     =   4680
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3195
  10.    ScaleWidth      =   4680
  11.    Begin VB.Label Label1 
  12.       Caption         =   "Label1"
  13.       Height          =   375
  14.       Left            =   840
  15.       TabIndex        =   0
  16.       Top             =   360
  17.       Width           =   2775
  18.    End
  19. End
  20. Attribute VB_Name = "Form1"
  21. Attribute VB_GlobalNameSpace = False
  22. Attribute VB_Creatable = False
  23. Attribute VB_PredeclaredId = True
  24. Attribute VB_Exposed = False
  25. '// ----------------------------------------------------------------------------
  26. '//
  27. '//  Project File:  CallingBB.vbp
  28. '//                 A sample program that uses Declare Function to
  29. '//                 access MakeBackupCD from BackupBurner.dll.
  30. '//
  31. '//  Edit the program path values before compiling.
  32. '//
  33. '//  Demo for use with Backup-Burner Add-on SDK
  34. '//  February, 2002
  35. '//  ⌐Desernet Broadband Media, Inc.
  36. '//  Produced by: D. Clark
  37. '//
  38. '//  Compiles in Visual Basic 6 SP5 without warnings or errors.
  39. '//
  40. '// ----------------------------------------------------------------------------
  41.  
  42. 'Declare the dll's Function and Location here...
  43. Private Declare Function MakeBackupCD Lib "Bin\BackupBurner.dll" _
  44. (ByVal BBRegName As String, _
  45.  ByVal BBRegCode As String, _
  46.  ByVal BBVolume As String, _
  47.  ByVal BBTitle As String, _
  48.  ByVal BBColorForm As String, _
  49.  ByVal BBColorText As String, _
  50.  ByVal PathtoBinFolder As String, _
  51.  ByVal BBFutureUse As String _
  52. ) As Integer
  53. 'Notice that the path of the dll above is a relative path.
  54. 'Other path choices are full: "c:\myprogpath\Bin\BackupBurner.dll"
  55. 'or within same folder: "BackupBurner.dll"
  56.  
  57. Private Sub Form_Load()
  58.     
  59.     'Use Visual Basic's built in error checking
  60.     On Error GoTo Err_Load
  61.    
  62.     'Load the strings as shown
  63.     BBRegName = "DEMOUSER" 'For Demo use
  64.     BBRegCode = "ABCD1234" 'For Demo use
  65.     BBVolume = "MyBackupCD" 'You can name the CD (no spaces allowed)
  66.     BBTitle = "My program is ___" 'You can display your program name or comments here
  67.     BBColorForm = "clSilver"  'default is clSilver, dont use hex color
  68.     BBColorText = "clBlack"   'default is clBlack, dont use hex color
  69.     PathtoBackupFolder = "c:\myprogpath\FilesToBackup\"
  70.     BBFutureUse = ""
  71.  
  72.     MsgBox "Next will call the MakeBackupCD function in MakeBackupCD.dll...", vbInformation
  73.     
  74.     'Now call the function and wait for a ResultCode to return...
  75.     ResultCode = MakeBackupCD(BBRegName, BBRegCode, BBVolume, BBTitle, BBColorForm, BBColorText, PathtoBackupFolder, BBFutureUse)
  76.         
  77.     'Display the ResultCode...
  78.     Form1.Label1.Caption = "ResultCode= " & ResultCode
  79.   
  80.    Exit Sub
  81. Err_Load:
  82.    MsgBox "Error loading dll, check for correct path in the Function Declaration.", vbCritical
  83.    
  84. End Sub
  85.  
  86.  
  87.